package edu.netjava.dbstructor;

import java.sql.Connection;
import java.sql.DriverManager;

public class Connector {

	public static Connection con;

	public final static String DATA_BASE = "student";
	public final static String DRIVER = "com.mysql.jdbc.Driver";
	public final static String URL = "jdbc:mysql://localhost:3306/" + DATA_BASE;
	public final static String USER = "root";
	public final static String PASSWORD = "netjava";

	static {

		try {
			Class.forName(DRIVER);
			con = DriverManager.getConnection(URL, USER, PASSWORD);

		} catch (Exception e) {
			e.printStackTrace();
		}

	}

	public static  Connection getConnection() {

		return con;

	}

}
